package com.yl.pattern.creatormodel.factory.simple_factory;


/**
 * @Author 小羊
 * @Date 29/10/2024下午 8:18
 * @ClassName CoffeeStore
 * @Description 咖啡店
 */
public class CoffeeStore {
    public Coffee orderCoffee(String type){
        SimpleCoffeeFactory factory = new SimpleCoffeeFactory();
        //调用生产咖啡的方法
        Coffee coffee = factory.createCoffee(type);
        //加配料
        coffee.addMilk();
        coffee.addSugar();

        return coffee;
    }
}
